package com.jjty.dataGenerator.jserji.utils;

import java.util.Arrays;
import java.util.List;
import java.util.Random;

public class StudentDataFiller {
    private static final Random RANDOM = new Random();
    private static final List<String> RELATIONSHIPS = Arrays.asList("奶奶", "爷爷", "父亲", "母亲");
    private static final List<String> SEX_VALUES = Arrays.asList("0", "1"); // 0:女, 1:男

    /**
     * 根据 studentNumber 填充年级
     */
    public static String fillGrade(String studentNumber) {
        if (studentNumber == null) return null;
        
        if (studentNumber.contains("2022")) return "大班";
        if (studentNumber.contains("2023")) return "中班";
        if (studentNumber.contains("2024")) return "小班";
        
        return null; // 未匹配到年份
    }

    /**
     * 填充班级（固定为"统一班"）
     */
    public static String fillClassNumber() {
        return "统一班";
    }

    /**
     * 随机填充亲属关系
     */
    public static String fillRelationship() {
        return RELATIONSHIPS.get(RANDOM.nextInt(RELATIONSHIPS.size()));
    }

    /**
     * 随机填充性别（0/1）
     */
    public static String fillSex() {
        return SEX_VALUES.get(RANDOM.nextInt(SEX_VALUES.size()));
    }
}